﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Itfort.Web;
using WanPiJie.Products;
namespace WanPiJie.WebSite.Cmmdty
{
	public partial class Go : System.Web.UI.Page
	{
		protected Commodity Commodity
		{
			get;
			private set;
		}

		protected void Page_Load(object sender, EventArgs e)
		{
			var serialNumber = this.Request.ToInt64("x");
			this.Commodity = WpjSf.CommodityService.GetCommodity(serialNumber);
			if (this.Commodity != null)
			{
				if (string.IsNullOrEmpty(this.Request["s"]))
				{
					this.Response.Redirect(this.Commodity.Url, true);
				}
				else
				{
					this.Response.Redirect(this.Commodity.ShopUrl, true);
				}
			}
		}
	}
}